-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/pose type #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/pose type #20
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #20 +/- ##
==========================================
+ Coverage 98.03% 98.11% +0.08%
==========================================
Files 5 5
Lines 407 425 +18
Branches 87 97 +10
==========================================
+ Hits 399 417 +18
Misses 4 4
Partials 4 4
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
| template <typename T> | ||
| concept ROSPoseLike = | ||
| same_bare_as<T, geometry_msgs::msg::Pose> || | ||
| same_bare_as<T, geometry_msgs::msg::PoseArray> || | ||
| same_bare_as<T, geometry_msgs::msg::PoseStamped> || | ||
| same_bare_as<T, geometry_msgs::msg::PoseWithCovarianceStamped>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just have one function that converts from Pose to Eigen::Matrix<double, 6, 1>? All of the types include Pose, so it will be pretty straightforward to use on them anyway 🤷♂️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because I have a test node I'm working on where the pose subscriber callback function is templated so the function call becomes uniform for all pose types:
template <ValidPoseMsg MsgT>
void IPDAPoseFilteringNode::pose_callback(
const typename MsgT::ConstSharedPtr& msg) {
Measurements measurements = vortex::utils::ros_conversions::ros_to_eigen6d(*msg);Where measurements defined:
using Measurements = Eigen::Matrix<double, 6, Eigen::Dynamic>;
Andeshog
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough👌🏼
Util function to convert from ros2 pose message types to Eigen::Matrix<double, 6, Eigen::Dynamic> representing orientations as Euler/RPY.
Also added tests🤓